$(document).ready(function(){
	getLocalPersonData();
});

function getLocalPersonData(){
	var chart = Highcharts.chart('container',{
		chart: {
			type: 'column'
		},
		title: {
			text: '本周平均每日睡眠数据对比图'
		},
		xAxis: {
			categories: [
				'8-20','8-21','8-22','8-23','8-24','8-25','8-26'
			],
			crosshair: true
		},
		yAxis: {
			min: 0,
			title: {
				text: '时长（分钟）'
			}
		},
		exporting:{
	    	enabled:false
	    },
	    credits:{
	    	enabled:false
	    },
		tooltip: {
			// head + 每个 point + footer 拼接成完整的 table
			headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
			pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
			'<td style="padding:0"><b>{point.y:.1f} 分钟</b></td></tr>',
			footerFormat: '</table>',
			shared: true,
			useHTML: true
		},
		plotOptions: {
			column: {
				borderWidth: 0
			}
		},
		series: [{
			name: '深睡眠',
			data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6]
		}, {
			name: '浅睡眠',
			data: [83.6, 78.8, 98.5, 93.4, 106.0, 84.5, 105.0]
		}, {
			name: '醒着',
			data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0]
		}]
	});
}
